<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<link rel="shortcut icon" type="image/png" href="../assets/img/favicon.ico">

	<link rel="stylesheet" href="../assets/lib/cssgrids.css">
	<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">

	<script src="../assets/lib/yui-min.js"></script>
	<script src="../assets/js/api-prettify.js"></script>
	<script src="../assets/js/api-filter.js"></script>
	<script src="../assets/js/api-list.js"></script>
	<script src="../assets/js/api-search.js"></script>
	<script src="../assets/js/api-docs.js"></script>

	<title>nunuStudio ARHandler</title>
</head>
<body class="yui3-skin-sam">
	<div id="doc">
		<div id="hd" class="yui3-g header">
			<div class="yui3-u-3-4">
					<h1><a href="../index.html"><img src="../assets/img/logo.png" title=""></a></h1>
			</div>
		</div>
		<div id="bd" class="yui3-g">
			<div class="yui3-u-1-4">
				<div id="docs-sidebar" class="sidebar">
					<div id="api-list">
						<h2 class="off-left">APIs</h2>
						<div id="api-tabview" class="tabview">
							<div id="api-tabview-filter">
								<input type="search" id="api-filter" placeholder="Type to filter APIs">
							</div>
							<ul class="tabs">
								<li><a href="#api-classes">Classes</a></li>
								<li><a href="#api-modules">Modules</a></li>
							</ul>
							<div id="api-tabview-panel">
								<ul id="api-classes" class="apis classes">
									<li><a href="../classes/AfterimagePass.html">AfterimagePass</a></li>
									<li><a href="../classes/AmbientLight.html">AmbientLight</a></li>
									<li><a href="../classes/AnimationMixer.html">AnimationMixer</a></li>
									<li><a href="../classes/AnimationTimer.html">AnimationTimer</a></li>
									<li><a href="../classes/App.html">App</a></li>
									<li><a href="../classes/ARHandler.html">ARHandler</a></li>
									<li><a href="../classes/ArraybufferUtils.html">ArraybufferUtils</a></li>
									<li><a href="../classes/Audio.html">Audio</a></li>
									<li><a href="../classes/AudioEmitter.html">AudioEmitter</a></li>
									<li><a href="../classes/AudioLoader.html">AudioLoader</a></li>
									<li><a href="../classes/Base64Utils.html">Base64Utils</a></li>
									<li><a href="../classes/BaseNode.html">BaseNode</a></li>
									<li><a href="../classes/BillboardGroup.html">BillboardGroup</a></li>
									<li><a href="../classes/BloomPass.html">BloomPass</a></li>
									<li><a href="../classes/BokehPass.html">BokehPass</a></li>
									<li><a href="../classes/BufferUtils.html">BufferUtils</a></li>
									<li><a href="../classes/ByteArrayUtils.html">ByteArrayUtils</a></li>
									<li><a href="../classes/CanvasSprite.html">CanvasSprite</a></li>
									<li><a href="../classes/CanvasTexture.html">CanvasTexture</a></li>
									<li><a href="../classes/CapsuleBufferGeometry.html">CapsuleBufferGeometry</a></li>
									<li><a href="../classes/ColorifyPass.html">ColorifyPass</a></li>
									<li><a href="../classes/CompressedTexture.html">CompressedTexture</a></li>
									<li><a href="../classes/CopyPass.html">CopyPass</a></li>
									<li><a href="../classes/CSS3DObject.html">CSS3DObject</a></li>
									<li><a href="../classes/CSS3DRenderer.html">CSS3DRenderer</a></li>
									<li><a href="../classes/CSS3DSprite.html">CSS3DSprite</a></li>
									<li><a href="../classes/CubeCamera.html">CubeCamera</a></li>
									<li><a href="../classes/CubeTexture.html">CubeTexture</a></li>
									<li><a href="../classes/DataTexture.html">DataTexture</a></li>
									<li><a href="../classes/DirectionalLight.html">DirectionalLight</a></li>
									<li><a href="../classes/DirectionalLightCSM.html">DirectionalLightCSM</a></li>
									<li><a href="../classes/DotScreenPass.html">DotScreenPass</a></li>
									<li><a href="../classes/EffectComposer.html">EffectComposer</a></li>
									<li><a href="../classes/EventManager.html">EventManager</a></li>
									<li><a href="../classes/FileSystem.html">FileSystem</a></li>
									<li><a href="../classes/FilmPass.html">FilmPass</a></li>
									<li><a href="../classes/FirstPersonControls.html">FirstPersonControls</a></li>
									<li><a href="../classes/Fog.html">Fog</a></li>
									<li><a href="../classes/Font.html">Font</a></li>
									<li><a href="../classes/FontLoader.html">FontLoader</a></li>
									<li><a href="../classes/FXAAPass.html">FXAAPass</a></li>
									<li><a href="../classes/Gamepad.html">Gamepad</a></li>
									<li><a href="../classes/GeometryLoader.html">GeometryLoader</a></li>
									<li><a href="../classes/Group.html">Group</a></li>
									<li><a href="../classes/Gyroscope.html">Gyroscope</a></li>
									<li><a href="../classes/HemisphereLight.html">HemisphereLight</a></li>
									<li><a href="../classes/HTMLView.html">HTMLView</a></li>
									<li><a href="../classes/HueSaturationPass.html">HueSaturationPass</a></li>
									<li><a href="../classes/Image.html">Image</a></li>
									<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
									<li><a href="../classes/InstancedMesh.html">InstancedMesh</a></li>
									<li><a href="../classes/Key.html">Key</a></li>
									<li><a href="../classes/Keyboard.html">Keyboard</a></li>
									<li><a href="../classes/LegacyGeometryLoader.html">LegacyGeometryLoader</a></li>
									<li><a href="../classes/LensFlare.html">LensFlare</a></li>
									<li><a href="../classes/LightProbe.html">LightProbe</a></li>
									<li><a href="../classes/LocalStorage.html">LocalStorage</a></li>
									<li><a href="../classes/Material.html">Material</a></li>
									<li><a href="../classes/MaterialLoader.html">MaterialLoader</a></li>
									<li><a href="../classes/MathUtils.html">MathUtils</a></li>
									<li><a href="../classes/Measurement.html">Measurement</a></li>
									<li><a href="../classes/Mesh.html">Mesh</a></li>
									<li><a href="../classes/Model.html">Model</a></li>
									<li><a href="../classes/Mouse.html">Mouse</a></li>
									<li><a href="../classes/NodeScript.html">NodeScript</a></li>
									<li><a href="../classes/Nunu.html">Nunu</a></li>
									<li><a href="../classes/Object3D.html">Object3D</a></li>
									<li><a href="../classes/ObjectLoader.html">ObjectLoader</a></li>
									<li><a href="../classes/ObjectUtils.html">ObjectUtils</a></li>
									<li><a href="../classes/OperationNode.html">OperationNode</a></li>
									<li><a href="../classes/OrbitControls.html">OrbitControls</a></li>
									<li><a href="../classes/OrthographicCamera.html">OrthographicCamera</a></li>
									<li><a href="../classes/ParametricBufferGeometry.html">ParametricBufferGeometry</a></li>
									<li><a href="../classes/ParticleDistributions.html">ParticleDistributions</a></li>
									<li><a href="../classes/ParticleEmitter.html">ParticleEmitter</a></li>
									<li><a href="../classes/ParticleEmitterControl.html">ParticleEmitterControl</a></li>
									<li><a href="../classes/ParticleEmitterControlOptions.html">ParticleEmitterControlOptions</a></li>
									<li><a href="../classes/ParticleGroup.html">ParticleGroup</a></li>
									<li><a href="../classes/Pass.html">Pass</a></li>
									<li><a href="../classes/PerspectiveCamera.html">PerspectiveCamera</a></li>
									<li><a href="../classes/PhysicsGenerator.html">PhysicsGenerator</a></li>
									<li><a href="../classes/PhysicsObject.html">PhysicsObject</a></li>
									<li><a href="../classes/PointLight.html">PointLight</a></li>
									<li><a href="../classes/PositionalAudio.html">PositionalAudio</a></li>
									<li><a href="../classes/Program.html">Program</a></li>
									<li><a href="../classes/PythonScript.html">PythonScript</a></li>
									<li><a href="../classes/RectAreaLight.html">RectAreaLight</a></li>
									<li><a href="../classes/RendererConfiguration.html">RendererConfiguration</a></li>
									<li><a href="../classes/RendererState.html">RendererState</a></li>
									<li><a href="../classes/RenderPass.html">RenderPass</a></li>
									<li><a href="../classes/Resource.html">Resource</a></li>
									<li><a href="../classes/ResourceManager.html">ResourceManager</a></li>
									<li><a href="../classes/RoundedBoxBufferGeometry.html">RoundedBoxBufferGeometry</a></li>
									<li><a href="../classes/Scene.html">Scene</a></li>
									<li><a href="../classes/Script.html">Script</a></li>
									<li><a href="../classes/ShaderAttribute.html">ShaderAttribute</a></li>
									<li><a href="../classes/ShaderPass.html">ShaderPass</a></li>
									<li><a href="../classes/ShaderUtils.html">ShaderUtils</a></li>
									<li><a href="../classes/SimplexNoise.html">SimplexNoise</a></li>
									<li><a href="../classes/Skeleton.html">Skeleton</a></li>
									<li><a href="../classes/SkinnedMesh.html">SkinnedMesh</a></li>
									<li><a href="../classes/Sky.html">Sky</a></li>
									<li><a href="../classes/SobelPass.html">SobelPass</a></li>
									<li><a href="../classes/SpineAnimation.html">SpineAnimation</a></li>
									<li><a href="../classes/SpineTexture.html">SpineTexture</a></li>
									<li><a href="../classes/SpotLight.html">SpotLight</a></li>
									<li><a href="../classes/Sprite.html">Sprite</a></li>
									<li><a href="../classes/SpriteSheetTexture.html">SpriteSheetTexture</a></li>
									<li><a href="../classes/SSAONOHPass.html">SSAONOHPass</a></li>
									<li><a href="../classes/SSAOPass.html">SSAOPass</a></li>
									<li><a href="../classes/SSAOShader.html">SSAOShader</a></li>
									<li><a href="../classes/TargetConfig.html">TargetConfig</a></li>
									<li><a href="../classes/TechnicolorPass.html">TechnicolorPass</a></li>
									<li><a href="../classes/TerrainBufferGeometry.html">TerrainBufferGeometry</a></li>
									<li><a href="../classes/TextBitmap.html">TextBitmap</a></li>
									<li><a href="../classes/TextFile.html">TextFile</a></li>
									<li><a href="../classes/TextMesh.html">TextMesh</a></li>
									<li><a href="../classes/TextSprite.html">TextSprite</a></li>
									<li><a href="../classes/Texture.html">Texture</a></li>
									<li><a href="../classes/TextureLoader.html">TextureLoader</a></li>
									<li><a href="../classes/Timer.html">Timer</a></li>
									<li><a href="../classes/TizenKeyboard.html">TizenKeyboard</a></li>
									<li><a href="../classes/Tree.html">Tree</a></li>
									<li><a href="../classes/TreeUtils.html">TreeUtils</a></li>
									<li><a href="../classes/TwistModifier.html">TwistModifier</a></li>
									<li><a href="../classes/TypedArrayHelper.html">TypedArrayHelper</a></li>
									<li><a href="../classes/UnitConverter.html">UnitConverter</a></li>
									<li><a href="../classes/UnrealBloomPass.html">UnrealBloomPass</a></li>
									<li><a href="../classes/Video.html">Video</a></li>
									<li><a href="../classes/VideoLoader.html">VideoLoader</a></li>
									<li><a href="../classes/VideoStream.html">VideoStream</a></li>
									<li><a href="../classes/VideoTexture.html">VideoTexture</a></li>
									<li><a href="../classes/Viewport.html">Viewport</a></li>
									<li><a href="../classes/VRHandler.html">VRHandler</a></li>
									<li><a href="../classes/WebcamTexture.html">WebcamTexture</a></li>
									<li><a href="../classes/WorkerPool.html">WorkerPool</a></li>
									<li><a href="../classes/WorkerTask.html">WorkerTask</a></li>
									<li><a href="../classes/{Object} ParticleGroupOptions.html">{Object} ParticleGroupOptions</a></li>
								</ul>
					
								<ul id="api-modules" class="apis modules">
									<li><a href="../modules/Animation.html">Animation</a></li>
									<li><a href="../modules/Animations.html">Animations</a></li>
									<li><a href="../modules/Audio.html">Audio</a></li>
									<li><a href="../modules/BinaryUtils.html">BinaryUtils</a></li>
									<li><a href="../modules/Cameras.html">Cameras</a></li>
									<li><a href="../modules/Controls.html">Controls</a></li>
									<li><a href="../modules/Core.html">Core</a></li>
									<li><a href="../modules/Files.html">Files</a></li>
									<li><a href="../modules/Input.html">Input</a></li>
									<li><a href="../modules/Lights.html">Lights</a></li>
									<li><a href="../modules/Loaders.html">Loaders</a></li>
									<li><a href="../modules/Meshes.html">Meshes</a></li>
									<li><a href="../modules/Misc.html">Misc</a></li>
									<li><a href="../modules/Particles.html">Particles</a></li>
									<li><a href="../modules/Physics.html">Physics</a></li>
									<li><a href="../modules/Postprocessing.html">Postprocessing</a></li>
									<li><a href="../modules/Resources.html">Resources</a></li>
									<li><a href="../modules/Runtime.html">Runtime</a></li>
									<li><a href="../modules/Script.html">Script</a></li>
									<li><a href="../modules/Sprite.html">Sprite</a></li>
									<li><a href="../modules/Textures.html">Textures</a></li>
									<li><a href="../modules/THREE.html">THREE</a></li>
									<li><a href="../modules/Utils.html">Utils</a></li>
								</ul>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="yui3-u-3-4">
				<!--<div id="api-options">
					Show:
					<label for="api-show-inherited">
						<input type="checkbox" id="api-show-inherited" checked>
						Inherited
					</label>
					<label for="api-show-protected">
						<input type="checkbox" id="api-show-protected">
						Protected
					</label>
					<label for="api-show-private">
						<input type="checkbox" id="api-show-private">
						Private
					</label>
					<label for="api-show-deprecated">
						<input type="checkbox" id="api-show-deprecated">
						Deprecated
					</label>
				</div>-->				<div class="apidocs">
					<div id="docs-main">
						<div class="content">
							<h1>ARHandler Class</h1>
							<div class="box meta">
							
							
							
										Module: <a href="../modules/Physics.html">Physics</a>
							
							</div>
							
							
							<div class="box intro">
								<p>AR class handles all the augmented reality related tasks.</p>
							<p>Can be used to detect if the host system is capable of displaying AR content and checks for the availability of WebXR with the required modes.</p>
							
							</div>
							
							
							<div id="classdocs" class="tabview">
								<ul class="api-class-tabs">
									<li class="api-class-tab index"><a href="#index">Index</a></li>
							
										<li class="api-class-tab methods"><a href="#methods">Methods</a></li>
										<li class="api-class-tab attrs"><a href="#attrs">Attributes</a></li>
								</ul>
							
								<div>
									<div id="index" class="api-class-tabpanel index">
										<h2 class="off-left">Item Index</h2>
							
											<div class="index-section methods">
												<h3>Methods</h3>
							
												<ul class="index-list methods">
														<li class="index-item method">
															<a href="#method_arAvailable">arAvailable</a>
							
														</li>
														<li class="index-item method">
															<a href="#method_enterAR">enterAR</a>
							
														</li>
														<li class="index-item method">
															<a href="#method_exitAR">exitAR</a>
							
														</li>
														<li class="index-item method">
															<a href="#method_getXRSession">getXRSession</a>
							
														</li>
												</ul>
											</div>
							
							
											<div class="index-section attrs">
												<h3>Attributes</h3>
							
												<ul class="index-list attrs">
														<li class="index-item attr">
															<a href="#attr_ADDITIVE">ADDITIVE</a>
														</li>
														<li class="index-item attr">
															<a href="#attr_ALPHA_BLEND">ALPHA_BLEND</a>
														</li>
														<li class="index-item attr">
															<a href="#attr_OPAQUE">OPAQUE</a>
														</li>
														<li class="index-item attr">
															<a href="#attr_webXRSession">webXRSession</a>
														</li>
														<li class="index-item attr">
															<a href="#attr_webXRSupported">webXRSupported</a>
														</li>
												</ul>
											</div>
							
									</div>
							
										<div id="methods" class="api-class-tabpanel">
											<h2 class="off-left">Methods</h2>
							
												<div id="method_arAvailable" class="method item">
													<h3 class="name"><code>arAvailable</code></h3>
												
														<span class="paren">()</span>
												
														<span class="returns-inline">
															<span class="type">Boolean</span>
														</span>
												
												
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
												
													</div>
												
													<div class="description">
														<p>Check if there is any AR API available, on the device.</p>
												<p>Checks if there is support for WebAR or WebXR.</p>
												
													</div>
												
												
														<div class="returns">
															<h4>Returns:</h4>
												
															<div class="returns-description">
																		<span class="type">Boolean</span>:
																	<p>True if the browser supports AR.</p>
												
															</div>
														</div>
												
												</div>
												<div id="method_enterAR" class="method item">
													<h3 class="name"><code>enterAR</code></h3>
												
														<div class="args">
															<span class="paren">(</span><ul class="args-list inline commas">
																<li class="arg">
																		<code>renderer</code>
																</li>
																<li class="arg">
																		<code>onSuccess</code>
																</li>
															</ul><span class="paren">)</span>
														</div>
												
												
												
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
												
													</div>
												
													<div class="description">
														<p>Enter virtual reality mode using WebXR or WebAR depending on the API available.</p>
												<p>If booth API are available the WebXR API is used.</p>
												<p>When displaying AR content the display.requestAnimationFrame should be used to call the render method.</p>
												
													</div>
												
														<div class="params">
															<h4>Parameters:</h4>
												
															<ul class="params-list">
																<li class="param">
																		<code class="param-name">renderer</code>
																		<span class="type">WebGLRenderer</span>
												
												
																	<div class="param-description">
																		<p>Renderer used to draw the scene.</p>
												
																	</div>
												
																</li>
																<li class="param">
																		<code class="param-name">onSuccess</code>
																		<span class="type">Function</span>
												
												
																	<div class="param-description">
																		<p>Method called if the application entered AR successfully.</p>
												
																	</div>
												
																</li>
															</ul>
														</div>
												
												
												</div>
												<div id="method_exitAR" class="method item">
													<h3 class="name"><code>exitAR</code></h3>
												
														<div class="args">
															<span class="paren">(</span><ul class="args-list inline commas">
																<li class="arg">
																		<code>renderer</code>
																</li>
															</ul><span class="paren">)</span>
														</div>
												
												
												
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
												
													</div>
												
													<div class="description">
														<p>Enter virtual reality mode, if the application is not running on AR mode does not do anything.</p>
												
													</div>
												
														<div class="params">
															<h4>Parameters:</h4>
												
															<ul class="params-list">
																<li class="param">
																		<code class="param-name">renderer</code>
																		<span class="type">WebGLRenderer</span>
												
												
																	<div class="param-description">
																		<p>Renderer used to draw the scene.</p>
												
																	</div>
												
																</li>
															</ul>
														</div>
												
												
												</div>
												<div id="method_getXRSession" class="method item">
													<h3 class="name"><code>getXRSession</code></h3>
												
														<span class="paren">()</span>
												
														<span class="returns-inline">
															<span class="type">Promise</span>
														</span>
												
												
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
												
													</div>
												
													<div class="description">
														<p>Get WebXR session.</p>
												
													</div>
												
												
														<div class="returns">
															<h4>Returns:</h4>
												
															<div class="returns-description">
																		<span class="type">Promise</span>:
																	<p>Promise used to get the XR session, receives the session as argument.</p>
												
															</div>
														</div>
												
												</div>
										</div>
							
							
										<div id="attrs" class="api-class-tabpanel">
											<h2 class="off-left">Attributes</h2>
							
												<div id="attr_ADDITIVE" class="attr item">
													<a name="config_ADDITIVE"></a> 
													<h3 class="name"><code>ADDITIVE</code></h3>
													<span class="type">String</span>
												
												
												
												
														<span class="flag static">static</span>
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
													</div>
												
													<div class="description">
														<p>Primarily used by AR devices with transparent lenses which directly allow reality to pass through to the user's eyes.</p>
												
													</div>
												
												
												
												</div>
												<div id="attr_ALPHA_BLEND" class="attr item">
													<a name="config_ALPHA_BLEND"></a> 
													<h3 class="name"><code>ALPHA_BLEND</code></h3>
													<span class="type">String</span>
												
												
												
												
														<span class="flag static">static</span>
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
													</div>
												
													<div class="description">
														<p>Used by headsets or goggles which use cameras to capture the real world and display it digitally on the screen or screens used to render the content for the user to see, this offers a way to create an AR presentation using a VR device.</p>
												
													</div>
												
												
												
												</div>
												<div id="attr_OPAQUE" class="attr item">
													<a name="config_OPAQUE"></a> 
													<h3 class="name"><code>OPAQUE</code></h3>
													<span class="type">String</span>
												
												
												
												
														<span class="flag static">static</span>
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
													</div>
												
													<div class="description">
														<p>The rendered image is drawn without allowing any pass-through imagery. This is primarily used by fully-immersive VR headsets.</p>
												
													</div>
												
												
												
												</div>
												<div id="attr_webXRSession" class="attr item">
													<a name="config_webXRSession"></a> 
													<h3 class="name"><code>webXRSession</code></h3>
													<span class="type">XRSession</span>
												
												
												
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
													</div>
												
													<div class="description">
														<p>WebXR session if there is one active.</p>
												
													</div>
												
												
												
												</div>
												<div id="attr_webXRSupported" class="attr item">
													<a name="config_webXRSupported"></a> 
													<h3 class="name"><code>webXRSupported</code></h3>
													<span class="type">Boolean</span>
												
												
												
												
												
												
												
												
													<div class="meta">
																<p>
														</p>
												
												
													</div>
												
													<div class="description">
														<p>Flag checking if there is support for XR immersive AR mode.</p>
												
													</div>
												
												
												
												</div>
										</div>
							
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>
</html>
